<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>工单管理</title>
    <link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css" />
</head>

<body class="pear-container">
    <?php if ($my == "list") : ?>
    <div class="layui-card layui-form" lay-filter="component-form-element" style="margin-top: 10px;">
            <div class="layui-tab layui-tab-card">
                <ul class="layui-tab-title">
                    <li class="layui-this">工单一览</li>
                    <li>操作中心</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">


                        <table id="news" lay-filter="news"></table>

                        <script type="text/html" id="active">
                        {{# if(d.active == 1){ }} 
                        <button class="pear-btn pear-btn-primary pear-btn-sm"><i class="layui-icon layui-icon-ok"></i></button>
                        {{# }else{ }}
                        <button class="pear-btn pear-btn-danger pear-btn-sm"><i class="layui-icon layui-icon-close"></i></button>
                        {{# } }}
                        </script>

                        <script type="text/html" id="options">

                            <button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-release"></i></button>
                            <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
                        </script>
                    </div>
                    <div class="layui-tab-item" style="height: 200px;">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">工单类型设置</label>
                                    <div class="layui-input-block">
                                        <textarea id="pay_work_name" placeholder="请输入" class="layui-textarea"><?php echo $conf['pay_work_name']; ?></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否开启工单系统</label>
                                    <div class="layui-input-block">
                                        <select id="work_zt" default="<?php echo $conf['work_zt'] ?>">
                                            <option value="1" <?= $conf['work_zt'] == 1 ? "selected" : "" ?>>开启</option>
                                            <option value="0" <?= $conf['work_zt'] == 0 ? "selected" : "" ?>>关闭</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                    

                    <div class="layui-col-md12">
                        <div class="layui-form-item">
                            <button style="margin-left: 25px;" id="submitSys" class="pear-btn pear-btn-primary">更新数据</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    <?php endif; ?>
    <?php if ($my == "edit") : ?>
         <form class="layui-form" action="">
            <div class="mainBox">
                <div class="main-container">
                    <input type="hidden" name="id" type="text" value="<?= $id ?>" />
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            用户提问:
                        </label>
                        <div class="layui-input-block">
                            <textarea class="layui-textarea layui-form-danger" readonly><?=$row['text']?></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                    <label class="layui-form-label">
                        官方回复:
                    </label>
                    <div class="layui-input-block">
                        <textarea class="<?= $class ?>" name="huifu" <?= $readonly ?>><?= $row['huifu'] ?></textarea>
                    </div>
                </div>
                </div>
            </div>
            <div class="bottom">
                <div class="button-container">
                    <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="editSave">
                        <i class="layui-icon layui-icon-ok"></i>
                        提交
                    </button>
                    <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                        <i class="layui-icon layui-icon-refresh"></i>
                        重置
                    </button>
                </div>
            </div>
        </form>
        
        <?php endif; ?>
<script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
<script src="<?=adminassets?>assets/pear/component/pear/pear.js"></script>
<script type="text/javascript" src="../Core/assets/js/jquery.min.js"></script>
<script src="<?=adminassets?>assets/js/core_js/Work.js"></script>